/**
 * @description: 首页大屏配置数据
 * @param {*}
 * @return {*}
 */
var itemColor = ['rgb(84,112,198)', 'rgb(158,223,127)', 'rgb(250,200,88)', 'rgb(238,102,102)', 'rgb(115,192,222)']
var data = [];
for (let i = 0; i < 5; ++i) {
    var value = Math.round(Math.random() * 200);
    data.push({
        value: value,
        itemStyle: {
            color: itemColor[i]
        }
    });
}

let dynamicOptions = [
    {
        title: {
            show: true,
            text: '进几年农大产量对比',
            left: 'center'
        },
        xAxis: {
            max: 'dataMax',
            name: '产量/KG'
        },
        yAxis: {
            type: 'category',
            name: '年份',
            nameLocation: 'start',
            data: ['2021', '2020', '2019', '2018', '2017'],
            inverse: true,
            animationDuration: 300,
            animationDurationUpdate: 300,
        },
        series: [{
            realtimeSort: true,
            type: 'bar',
            data: data,
            label: {
                show: true,
                position: 'right',
                valueAnimation: true
            }
        }],
        legend: {
            show: true
        },
        animationDuration: 0,
        animationDurationUpdate: 3000,
        animationEasing: 'linear',
        animationEasingUpdate: 'linear'
    }
]
export default {
    dynamicOptions
}